package com.jd.ty.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;



public class Function implements Serializable,Comparable<Function>{

	private static final long serialVersionUID = 8732341791566311793L;
	
	private Long functionId;
	private String functionName;
	private Function parent;
	private List<Function> children = new ArrayList<Function>();
	private String rootUrl;
	private String nameSpace;
	private boolean isDefault;

	public boolean getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(boolean isDefault) {
		this.isDefault = isDefault;
	}

	public Function() {
	}

	public Function(String functionName) {
		this.functionName = functionName;
	}

	public Function(String functionName, Function parent) {
		this.functionName = functionName;
		this.parent = parent;
	}


	public Long getFunctionId() {
		return this.functionId;
	}

	public void setFunctionId(Long functionId) {
		this.functionId = functionId;
	}

	public String getFunctionName() {
		return this.functionName;
	}

	public void setFunctionName(String functionName) {
		this.functionName = functionName;
	}

	public Function getParent() {
		return this.parent;
	}

	public String getRootUrl() {
		return rootUrl;
	}

	public void setRootUrl(String rootUrl) {
		this.rootUrl = rootUrl;
	}

	public void setParent(Function parent) {
		this.parent = parent;
	}

	public List<Function> getChildren() {
		return children;
	}

	public void setChildren(List<Function> children) {
		this.children = children;
	}

	public int compareTo(Function obj) {
		return this.getFunctionId().compareTo(obj.getFunctionId());
	}

	public String getNameSpace() {
		return nameSpace;
	}

	public void setNameSpace(String nameSpace) {
		this.nameSpace = nameSpace;
	}


}
